function WT = WeightWT_2(q,par);
% WEIGHT_WT_2.M        Version I.K. - 22/12/06
% This function is called by the objective function OBJ_FCT_GMM_MULTI_2
% Notations : Hamilton, ch 14

% Now at m = 0 out of q
gama0T = GamaM_2(0,par);
ST = gama0T;
m = 1;
while m <= q        % implementing eq 14.1.19 
    % Now at m out of q
%     m
    gamaMT = GamaM_2(m,par);
    ST = ST + (1-m/(q+1))*(gamaMT+gamaMT');
    m = m+1;
end
WT = inv(ST);
